﻿using System;
using System.Threading.Tasks;
using System.Linq.Expressions;
using Oliving.Edge.Model;
using Oliving.Edge.Model.Dto;
using Oliving.Edge.Model.Models;
using Oliving.Edge.IRepository.Base;
using Oliving.Edge.Model.ViewModels.ReportDto;
using System.Collections.Generic;

namespace Oliving.Edge.IRepository
{
    /// <summary>
    /// IDTSN_CanningRepository  , DTSN_Canning , 
    /// </summary>	
    public interface IDTSN_CanningRepository : IBaseRepository<DTSN_Canning>
    {

        /// <summary>
        /// 自定义分页查询
        /// </summary>
        /// <param name="whereExpression">查询条件</param>
        /// <param name="intPageIndex">页码（下标0）</param>
        /// <param name="intPageSize">页大小</param>
        /// <param name="strOrderByFileds">排序字段，如name asc,age desc</param>
        /// <returns></returns>
        Task<PageModel<DTSN_CanningPageDto>> QueryPageList(Expression<Func<DTSN_Canning, bool>> whereExpression, int intPageIndex = 1, int intPageSize = 20, string strOrderByFileds = null);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="whereExpression">查询条件</param>
        /// <param name="pageIndex">页码（下标0）</param>
        /// <param name="pageSize">页大小</param>
        /// <param name="sortField">排序字段</param>
        /// <param name="sortOrder">排序顺序</param>
        /// <returns></returns>
        Task<PageModel<DTSN_CanningPageDto>> QueryPageList(Expression<Func<DTSN_Canning, bool>> whereExpression, int pageIndex = 1, int pageSize = 20, string sortField = null, string sortOrder = null);



        Task<List<ChartDto>> ReportChart(Expression<Func<DTSN_Canning, bool>> whereExpression);
    }
}
